The invention described herein generally relates to a process and apparatus for facilitating the easy and automatic production of drawings. More particularly it relates to the automation of drawings using a Computer Aided Design (CAD) system by persons having a very low level of computer programming skills.
Automation of the production of engineering drawings is a goal which is sought by many companies. This is specifically true of companies which are involved in the design and production of customized process equipment. In such cases, it is very difficult to create a set of standard drawings which can be easily modified for issue for fabrication. Currently, the only way for a company to automate its drawings is through the creation of customized computer programs written by skilled computer programmers. However, most manufacturing companies, especially small ones which make up a significant portion of the national economy, lack the programming expertise to create these programs in-house. These programs are generally very tedious and time consuming to write. Use of outside computer programming consultants for this purpose is expensive. These outside programmers may also not fully understand the business of the company to create a customized computer program which adequately meets the needs of the company. Thus mistakes in the computer program may be made which may prove costly to the company in terms of improper design of the equipment and consequent re-work and customer dis-satisfaction. The evolving nature of business and competition also engenders almost continuous changes in the design of the equipment. These changes in equipment design are also difficult to incorporate into the customized computer program which often times may need very extensive, expensive, and time consuming modifications to incorporate the changes made in the design of the equipment into the computer program. In most cases, it is also very difficult for the average user to integrate such customized programs into the company""s equipment design program which is generally developed in-house through much trial and error.
A typical example would be a company which is involved in the design and manufacture of air-scrubbers. Such companies are typically small. They generally have an equipment sizing program which is based upon mass-transfer principles. This program would give the diameter and height of the scrubber tower to be used to meet a given scrubbing application. These parameters now have to be transformed into a mechanical design which has then to be made into fabrication drawings for the manufacture of the scrubber. The mechanical design may be carried out by hand or by another or the same computer program to give more details of the thickness of the shell and dimensions of other appurtenances which make up the complete scrubber system. These details then have to be drawn up using a CAD system to create the fabrication drawings for the manufacture of the scrubber. Generally this is done by manually modifying a drawing of a previous application with the new dimensions. A great increase in productivity could be achieved for such a company if the process design, the mechanical design, and the CAD programs could all be integrated so that a user could not only do the process design but at the same time, generate all the mechanical details and create a CAD drawing for the application. This would also enable the engineer to more accurately estimate the cost of the equipment for sales-proposal and budgetary purposes. Therefore it would be advantageous to have a means for the average small manufacturing company""s engineers and draftsmen to be able to create, maintain, and modify their own customized computer program for the automatic generation of drawings.
Currently many CAD packages offer several methods to automate drawings. One of the best known is the AutoLISP (R) language which is a part of the popular AutoCAD (R) program sold by Autodesk, Inc. of Sausalito, Calif. However, the disadvantage of the AutoLISP (R) language is that it is complicated for the average user to learn and use because it has its own specialized syntax which is unlike the regular English language. Programs written in the AutoLISP (R) language also work totally within the AutoCAD (R) environment. It is also difficult for the average user to combine the AutoLISP (R) code with code written in other languages like BASIC(R), QuickBASIC(R), VisualBASIC(R), C++ (R), FORTRAN (R), etc. Such a combination requires programming skills which are beyond the capability of the average user. Because of these considerations, programmers who are expert in the AutoLISP (R) language are also too expensive to be hired by the average small manufacturing company.
Another popular CAD program is the MicroStation (R) program sold by Bentley Systems, Inc. of Huntsville, Ala. This program uses a version of the popular BASIC (R) language to automate drawings. While not as complicated as the AutoLISP (R) language, it is still a distinct dialect of the BASIC (R) language. Therefore, it still has the disadvantage that it needs to be learnt to be used and then used on a regular basis for a person to be familiar with it. It also runs totally within the MicroStation environment and cannot be easily integrated, by the average user, with other engineering design programs.
Another way for a user to automate drawings within the AutoCAD(R) environment is to use the AutoCAD(R) script system which is provided as a means for creating slide shows of AutoCAD(R) drawings. The AutoCAD(R) script system is very easy for the average user to comprehend and use because it uses English-like commands to generate drawing entities. However, the disadvantage of the AutoCAD(R) script system is that there is no flexibility in varying the dimensions of the drawing entity automatically; once a drawing is defined using the AutoCAD(R) script system, the relationships between the dimensions remain fixed as shown in the drawing. All coordinate-points in the AutoCAD script commands are defined as numbers; they cannot be defined as user-defined and run-time variables as is possible in the AutoLISP (R) and MicroStation (R) environments. Since there is no way to provide variables or mathematical and boolean relationships between the coordinates of the points on the drawing, a change in one point does not automatically make a corresponding change in the other dimensions. Thus the AutoCAD(R) script system cannot be used to create a general mathematical model of the equipment which can be easily modified to depict a specific embodiment of the equipment. Such modifications would involve extensive and time consuming changes to the AutoCAD(R) script command file and are therefore not practical. The AutoCAD(R) script system also works totally within the AutoCAD (R) environment and cannot be easily integrated with the user""s design programs.
Other third party programs have been commercialized to make the automation of drawings easier. An example is the AutoBASIC (R) system sold by BitWise Solutions Inc. of Indianapolis, Ind. The AutoBASIC (R) programming language is a hybrid language modeled after QBASIC (R) and combined with the functions and commands familiar to AutoCAD (R) Development System and AutoLISP programmers. However, it too suffers from the disadvantage that it has to be learned and used on a regular basis for the user to become familiar with it. It also works totally from within the AutoCAD environment and cannot be easily integrated into other engineering design programs.
Another example of a drawing automation system is the CADRA-III FLEXDESIGN (R) system sold as part of the CADRA (R) package by ADRA Inc. of Lowell, Mass. The CADRA-III FLEXDESIGN (R) system is described as a graphical spreadsheet and is easy to use because it does not need any programming skills as required in the AutoLISP (R) system. It is also more flexible than the AutoCAD (R) script system because the user can change one of the dimensions on a drawing on the screen and the FLEXDESIGN (R) program will automatically make the corresponding mathematically defined changes in the other dimensions. However, the FLEXDESIGN(R) system works only within the CADRA-III (R) system which is a very specialized operating system unlike systems which operate under the DOS operating system. It also does not create a usable program which can be easily integrated into the user""s engineering program. A full description of the CADRA FLEXDESIGN (R) system is given in chapter 10 of the CADRA-III (R), version 9 user""s guide.
All of the above approaches require a specialized approach to automating drawings which need intense study and application for proficiency. It is the object of this invention to allow the average user to automatically create his/her drawing using only his basic knowledge of coordinate geometry and a rudimentary knowledge of programming. This object is achieved by creating a code generation program which automatically transforms the generalized mathematical equations which represent the drawing entities on a drawing into computer code which, when executed, will create customized CAD script commands which uniquely defines the drawing to the CAD program.
Code generation programs have long been known and have been used for various applications. However, their use for the creation of customized programs to create CAD script files in not known. An example of an application is described in U.S. Pat. No. 5,448,740 to Kiri (1995). The Kiri code-generation system uses similar concepts of generating a code automatically as described in the present invention. However, it is not applied to generating a code for CAD applications. It is used for the generation of specific interface code to produce an user interface between an user and an application program.
Accordingly it is the object of the present invention to create a computer software program (referred to herein as a xe2x80x9cparentxe2x80x9d program) and process which will easily and automatically generate an application-specific generalized computer program (referred to herein as a xe2x80x9cchildxe2x80x9d program) which has the capability of easily and automatically creating a customized script for the generation of CAD drawings of an specific embodiment of the application. The customized child program created by the parent program is general enough so that the user can easily change the run-time variables which define the specific embodiment of the application. The child program will then automatically change the other variables according to mathematically defined relationships between the coordinates of the drawing entities which make up the drawing and automatically generate a customized CAD script file which when run in the CAD program will generate the required customized drawing of the specific embodiment of the application. For example, the user can easily create a generalized computer language program which mathematical defines a scrubber system but the generalized program will also be capable of accepting run-time variables like scrubber diameter and height. Thus the user can easily create a customized drawing that represents the particular scrubber system that he/she is designing. The user will need minimum programming skills to create the child program. Furthermore, he/she will be able to integrate the child program with other child programs created by other users to create a comprehensive program to design an entire application. He/she will also be able to easily integrate his child program with other engineering design programs to create an integrated approach to designing, estimating, and fabricating his equipment. Finally, he/she will be able to do so using only a minimum knowledge of computer programming and without having to hire expensive external computer consultants and programmers for the purpose.
These and other objects are achieved by the present invention which preserves the advantages of using the AutoCAD (R) script system while also incorporating the flexibility of the AutoLISP (R) or CADRA FLEXDESIGN (R) programs.
The above objects are achieved by a method for creating a parent program which, when executed and when input with descriptive information pertaining to the drawing entities, automatically generates a child program which describes a general embodiment of the application. This child program, when executed and when input with run-time variables, creates a customized script which describes a specific embodiment of the application.
The parent program is created by providing the following computer code:
(a) computer code for generating a menu of drawing entities and computer code to select a drawing entity from the generated menu of drawing entities,
(b) run-time services computer code, for example, for opening and closing a CAD script file, and computer code to output this CAD script file manipulation code to the child program file,
(c) computer code to enable the parent program to accept descriptive information of the properties, for example, the x,y coordinates or the diameter, of the selected drawing entity. This information can be input either as numerical values of the properties of the drawing entity or as general mathematical equations interrelating the properties of the drawing entity with those of other drawing entities and special variables. The descriptive information also includes code to input run-time variables which can be input when the child program is executed to define unique aspects of the application,
(d) computer code to convert the above descriptive information into computer code fragments,
(e) templates of computer language statements,
(f) computer code to insert the above computer code fragments into the above templates of computer language statements. This insertion process creates functional computer statements for calculating the values of the properties of the selected drawing entity from the mathematical description of the properties which were input in (c),
(g) computer code to output the functional computer statements created in (f) to the child program,
(h) templates of CAD script commands for various drawing entities,
(I) computer code to combine the values of the properties of the drawing entity, that are calculated by the above functional computer statements, with the template of the CAD script command for that entity so that a functional CAD script command is created,
(j) computer statements to output the created functional CAD script command to a CAD script file, and
(k) computer code to output the CAD script templates in (h), the combiner code in
(I), and CAD script output-to-CAD script file statements in (j) to the child program.
When the parent program is executed, it first outputs the run-time service statements in (b) above to the child program file. The parent program then requests the user to select a drawing entity from the menu of drawing entities created by statements in (a) above. When the user selects a drawing entity, the parent program requests descriptive information, as described above, which defines the properties of the drawing entities. The parent program then combines this information with the computer language statement templates in (e) above for the selected drawing entity to create functional computer statements that describe the selected drawing entity. These functional statements are then outputted to the child program file. The parent program then requests the user to select another drawing entity. As successive drawing entities are selected, the child program file is built up with the additional functional computer statements which describe each successive drawing entity. When all the drawing entities have been selected, the parent program outputs the CAD script templates, the CAD script combiner code, and the CAD script command output statements to the child program.
Thus the child program which is generated by the operation of the parent program contains computer statements to open a CAD script file, computer statements to input run-time variables, computer statements to calculate the values of the properties of the drawing entity from the values of the properties of other drawing entities and special variables, computer statements to combine the values of the properties of the drawing entity with the CAD script command template to create a functional CAD command, and computer statements to output the CAD script commands to a CAD script command file.
When the child program is executed by the user, it requests the user for the values of any run-time variables that may be required to describe the specific embodiment of the application being drawn. When the user inputs these run-time variables, the child program calculates the values of the properties of each of the drawing entity that was selected during the execution of the child program. It then combines these values with the CAD script command template to create a functional CAD script command which it then outputs to the CAD script command file. Thus a sequence of CAD script commands, which describe all the drawing entities which make up the specific embodiment of the application, is written to the CAD script command file. When the CAD script command file is processed by the CAD program, the CAD program automatically generates the drawing of the specific embodiment of the application.
This brief summary was provided so that the nature of the invention may be understood quickly. A more complete understanding of the invention can be obtained by reference to the following detailed description of the preferred embodiment thereof in connection with the attached drawing.